package edu.egypt.filestream;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;

//objective 1 : using onClick property
public class FileStreamSampleActivity extends Activity {

	private EditText editText;


	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        editText = (EditText)findViewById(R.id.editText1);
        
    }

	
	public void onButtonClick(View v) {
		
		if(v.getId() == R.id.buttonSave){
			editText.setText("save");
		}else if (v.getId() == R.id.buttonEmpty){
			editText.setText("");
		}else{
			editText.setText("load");
		}
	}
}